package com.quwan.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
*
*
* @author quan
* @date 2022-06-11 17:40
*/
 

@Data
@Accessors(chain = true)
@TableName(value = "t_msg_record")
public class TMsgRecord implements Serializable {

    private static final long serialVersionUID = -1289755390453321771L;
    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 消息id
     */
    @TableField(value = "msg_key")
    private String msgKey;

    /**
     * 消息类型 im一致
     */
    @TableField(value = "msg_type")
    private String msgType;

    /**
     * 消息时间
     */
    @TableField(value = "msg_time")
    private Long msgTime;

    /**
     * 消息内容
     */
    @TableField(value = "msg_content")
    private String msgContent;

    /**
     * 会话id
     */
    @TableField(value = "session_key")
    private String sessionKey;

    /**
     * 消息发送人
     */
    @TableField(value = "sender")
    private Long sender;

    /**
     * 消息接收人
     */
    @TableField(value = "receiver")
    private Long receiver;

    /**
     * 0未审核 1已审核
     */
    @TableField(value = "status")
    private Integer status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private LocalDateTime time;
}